function FontMeasurer(){
    this.init$Eventable();
    this.initRenderable();
    this.$fontInfo = null;
}
FontMeasurer.prototype = {
    _TPL_ELM: '<div id="#{id}" class="QETextContent QELine" style="position:absolute;top:-32768px;visibility:hidden;white-space:nowrap;"></div>',
    renderHTML: function (){
        return Utils.format(this._TPL_ELM, { id: this.id() });
    },
    postRender: function (){
        this.refresh();
    },
    getFontInfo: function (){
        return this.$fontInfo;
    },
    refresh: function (){
        var fontInfo = {};
        var elm = this.elm();
        elm.innerHTML = Utils.stringRepeat('Wl', 1000);
        fontInfo.charWidth = elm.offsetWidth / 2000;
        elm.innerHTML = Utils.stringRepeat('国', 1000);
        fontInfo.cjkCharWidth = elm.offsetWidth / 1000;
        elm.innerHTML = 'jf繁';
        fontInfo.lineHeight = elm.offsetHeight;
        elm.innerHTML = '';
        this.$fontInfo = fontInfo;
    }
};

Utils.extend(FontMeasurer, Eventable);
Utils.extend(FontMeasurer, Renderable);
